package com.hyopt.modules.app.form.file;

import com.hyopt.common.validator.group.AddGroup;
import com.hyopt.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;

/**
 * <p>
 * 文件新增
 * </p>
 *
 * @author wanglei
 * @date 2019-07-23 18:44:31
 */
@Data
@ApiModel(value = "文件新增表单")
public class FileSaveForm implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "文件名称")
	@Length(max = 100, message = "文件名称不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String filename;

	@ApiModelProperty(value = "文件上传名称")
	@Length(max = 100, message = "文件上传名称不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String uploadname;

	@ApiModelProperty(value = "文件类型")
	@Length(max = 100, message = "文件类型不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String filetype;

	@ApiModelProperty(value = "本地地址")
	@Length(max = 200, message = "本地地址不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String localurl;

	@ApiModelProperty(value = "oss地址")
	@Length(max = 200, message = "oss地址不能超过{max}个字符", groups = {AddGroup.class, UpdateGroup.class})
	private String httpurl;

	@ApiModelProperty(value = "文件大小")
	private Long size;

}
